/**
 * Copyright (C) 2013-2014 the original author or authors.
 */
package com.foreveross.bsl.system.application.impl.extend;

import com.foreveross.bsl.common.utils.enums.Protocol;
import com.foreveross.bsl.common.utils.factory.InstanceFactory;
import com.foreveross.bsl.system.application.extend.AuthTypeApplication;


/**
 * @description
 *
 * @author rening
 * @version v1.0
 *
 * @2013-9-26
 *
 */
public class AuthInstanceFactory {

	public static AuthTypeApplication getAuthInstance(Protocol p){
		AuthTypeApplication app =  null;
		switch (p) {
		case Http:
			app = InstanceFactory.getContextInstance("HttpAuthApplication");
			break;
		case Https:
			app = InstanceFactory.getContextInstance("HttpsAuthApplication");
			break;
		default:
			app = InstanceFactory.getContextInstance("HttpAuthApplication");
			break;
		}
		return app;
	}
}
